CentOS 6
Sponsored Link

Squid Log Report - LightSquid
2014/08/16
 
Install LightSquid to generate Squid Log Report.
[1]
[2] Install LightSquid.
# install from EPEL

[root@prox ~]#
yum --enablerepo=epel -y install lightsquid lightsquid-apache
[root@prox ~]#
vi /etc/httpd/conf.d/lightsquid.conf
<Directory /usr/share/lightsquid/cgi>
    DirectoryIndex index.cgi
    Options ExecCGI
    AddHandler cgi-script .cgi
    AllowOverride None
   
# add IP address you permit to access

    Order Deny,Allow
    Deny from all
    Allow from 127.0.0.1 10.0.0.0/24
</Directory>
[root@prox ~]#
/etc/rc.d/init.d/httpd restart

Stopping httpd: [ OK ]
Starting httpd: [ OK ]
# generate log report

[root@prox ~]#
/usr/sbin/lightparser.pl
# log report is generated every day by cron by default
[3] If SELinux is enabled, change rules like follows.
[root@prox ~]#
chcon -R -t httpd_squid_content_t /var/lightsquid

[root@prox ~]#
semanage fcontext -a -t httpd_squid_content_t /var/lightsquid
[4] Access to the "http://(server's hostname or IP address)/lightsquid/" from ClientPC with Web browser, then, it's possible to see Squid Log report like follows.
 
Tweet